const path = require('path')

function resolve (dir) {
  return path.join(__dirname, '..', dir)
}

module.exports = {
  // publicPath: '/',
  publicPath: process.env.NODE_ENV === 'production' ? '/oa' : '/',
  outputDir: 'oa',
  productionSourceMap: false,
  devServer: {
    port: 3000,
    open: true,
    proxy: {
      '/': {
        target: 'https://cdb.workair.vip/operate',
        changeOrigin: true
      }
    }
  },
	configureWebpack: {
    resolve: {
      alias: {
        'assets': '@/assets',
        'components': '@/components',
        'views': '@/views',
      }
    },
  }
}